package fr.mywiki.view.web.struts.action.home;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import fr.mywiki.view.web.struts.action.ListAction;
import fr.mywiki.view.web.struts.form.ListForm;

public class HomeAction extends DispatchAction implements ListAction {
	public ActionForward selectElement(ActionMapping mapping,
			ActionForm actionForm, HttpServletRequest request,
			HttpServletResponse response) {
		ListForm form = (ListForm) actionForm;
		request.setAttribute(ELEMENT_ID, new Long(form.getIdElement()));
		return mapping.findForward("displayEntry");
	}
}
